<template>
	<view>
		<view class="header">
			<view class="headerCon">
				<view class="account ">
					<view class="assets">
						<view style="color: #C8EBB8;">总资产 (元)</view>
						<view class="money">3124.00</view>
					</view>
					<navigator url="/pages/Mine/personal/Recharge">
						<view class="recharge ">充值</view>
					</navigator>
				</view>
				<view class="cumulative ">
					<view class="item">
						<view style="color: #C8EBB8;">累计充值 (元)</view>
						<view class="money">0</view>
					</view>
					<view class="item">
						<view style="color: #C8EBB8;">累计消费 (元)</view>
						<view class="money">1876.01</view>
					</view>
				</view>
			</view>
		</view>
		<view class="row3">
			<block v-for="(item,index) in list" :key="index">
				<navigator class="grid3" open-type="navigate" :url="item.url" hover-class="none">
					<image :src="item.image"></image>
					<view class="title3">{{item.title}}</view>
				</navigator>
			</block>
		</view>
		<view class="conent1">
			<view class="conent1_item" style="background-color:#FFF6D1;" @click="myurl('/pages/Mine/personal/sign')">
				<view class="conent1_con">
					<view>签到领积分</view>
					<view>赚积分低现金</view>
				</view>
				<image src="../../../static/Mine/gift.png"></image>
			</view>
			<view class="conent1_item" style="background-color:#FFF3F3;">
				<view class="conent1_con">
					<view>领取优惠券</view>
					<view>满减享优惠</view>
				</view>
				<image src="../../../static/Mine/git2.png"></image>
			</view>
		</view>
		<view class="conent2">
			<view class="conent2_item" v-for="(lv, id) in contetn2" :key="id">
				<view class="conent2_left">
					<image :src="lv.image"></image>
					<view style="margin-left: 20rpx;">
						<view>{{lv.title1}}</view>
						<view class="conent2_text2">{{lv.title2}}</view>
					</view>
				</view>
				<view>
					<view class="conent2_btn">己结束</view>
				</view>
			</view>
		</view>
		<!-- 分隔线 -->
		<view class="line"></view>
		<view class="conent3">
			<span class="conent3_item"></span>
			<span>为你推荐</span>
			<span class="conent3_item"></span>
		</view>
		
		<view   class="conent4" v-for="(de,vi) in conent3" :key="vi" >
			<view v-for="(de,vi) in conent3" :key="vi"  class="conent4_item">
				<image :src="de.cover_plan"></image>
				<view>
					<view>{{de.name}}</view>
					<view class="conent4_price">{{de.price}}</view>
				</view>
			</view>
		</view>
		<view class="empty" :style='{height:height+"rpx"}' v-if="conent3.length==0">
			<Empty mode="list" ></Empty>
		</view>
	</view>
</template>
<script>
	import Empty from "../../../components/bw-Empty/bw-Empty"
	import List from "../../../components/bw-lists/bw-lists"
	export default {
		components: {
			List,
			Empty
			},
		data() {
			return {
				list: [{
						image: '../../../static/Mine/gift.png',
						title: '帐单记录',
						url:"/pages/Mine/bill/bill?type=1",
					},
					{
						image: '../../../static/Mine/gift.png',
						title: '消费记录',
						url:"/pages/Mine/bill/bill?type=2",
					},
					{
						image: '../../../static/Mine/gift.png',
						title: '充值记录',
						url:"/pages/Mine/bill/bill?type=3"
					},
					{
						image: '../../../static/Mine/gift.png',
						title: '积分中心'
					},
				],
				contetn2: [{
						image: '../../../static/Mine/gift.png',
						title1: '最新拼团活动',
						title2: '最新的优惠商品上架拼团'
					},
					{
						image: '../../../static/Mine/gift.png',
						title1: '最新拼团活动',
						title2: '最新的优惠商品上架拼团'
					},
					{
						image: '../../../static/Mine/gift.png',
						title1: '最新拼团活动',
						title2: '最新的优惠商品上架拼团'
					},
				],
				conent3:[
					// {cover_plan:'../../../static/Mine/6.png',name:"猕猴桃",price:"￥100.00"},
					// {cover_plan:"../../../static/Mine/6.png",name:"猕猴桃",price:"￥100.00"},
					// {cover_plan:"../../../static/Mine/6.png",name:"猕猴桃",price:"￥100.00"},
					// {cover_plan:"../../../static/Mine/6.png",name:"猕猴桃",price:"￥100.00"},
					// {cover_plan:"../../../static/Mine/6.png",name:"猕猴桃",price:"￥100.00"},
					// {cover_plan:"../../../static/Mine/6.png",name:"猕猴桃",price:"￥100.00"},
				],
				height:0,
			}
		},
		methods: {
			myurl(url){
				uni.navigateTo({
					url:url,
					fail(fail) {
						console.log(fail)
					}
				})
			}
		}
	}
</script>
<style lang="scss" scoped>
	.header {
		width: 95%;
		height: 320rpx;
		background-image: linear-gradient(90deg, #7cd242 0, #5cbe80 100%);
		border-radius: 20rpx;
		margin: 0 auto;
		color: #FFF;
		font-size: 24rpx;
	}

	.account {
		padding: 20rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;

	}

	.headerCon {
		// width: 100%;
		// padding: 20rpx; 
		margin: 20rpx;
		width: 95%;
	}

	.recharge {
		width: 120rpx;
		height: 50rpx;
		color: #7cd242;
		background-color: #FFF;
		border-radius: 50rpx;
		line-height: 50rpx;
		align-items: center;
		justify-content: center;
		font-size: 35rpx;
		font-weight: 400;
		padding-left: 50rpx;
	}

	.money {
		padding: 10rpx;
		font-size: 50rpx;
		font-weight: 500;
		font-family: GuildfordProBook;
	}

	.cumulative {
		padding: 20rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.row3 {
		margin-top: 40rpx;
		margin-bottom: 40rpx;
		width: 100%;
		display: flex;
		align-items: center;
		flex-wrap: wrap;

		.grid3 {
			display: flex;
			flex-direction: column;
			align-items: center;
			width: 25%;
			justify-content: flex-start;

			image {
				width: 60rpx;
				height: 60rpx;
			}

			.title3 {
				font-size: 24rpx;
				color: #666;
				margin-top: 15rpx;
				margin-bottom: 15rpx;
			}
		}
	}

	.conent1 {
		display: flex;
		justify-content: space-between;

		image {
			width: 100rpx;
			height: 100rpx;
		}
	}

	.conent1_item {
		width: 50%;
		padding: 20rpx;
		margin: 20rpx;
		display: flex;
		justify-content: space-between;
		border-radius: 20rpx;
	}

	.conent1_con {
		padding: 10rpx;
	}

	.conent2 {
		padding: 20rpx;

		image {
			width: 110rpx;
			height: 110rpx;
			border-radius: 50rpx;
		}
	}

	.conent2_item {
		padding: 10rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.conent2_btn {
		width: 120rpx;
		height: 50rpx;
		color: #AAAAAA;
		background-color: #F2F2F2;
		border-radius: 50rpx;
		line-height: 50rpx;
		align-items: center;
		justify-content: center;
		font-size: 28rpx;
		font-weight: 400;
		padding-left: 40rpx;
	}

	.conent2_text2 {
		color: #AAAAAA;
		font-size: 28rpx;
	}

	.conent2_left {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.line {
		width: 100%;
		height: 18rpx;
		background-color: #F5F5F5;
	}

	.conent3 {
		height: 100rpx;
		padding: 20rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.conent3_item{
		background-color: #333;
		background-size:2rpx ;
		height: 2rpx;
		align-items: center;
		width: 30%;
	}
.conent4{
	width: 43%;
	padding: 20rpx;
}
.conent4_price{
	color: #FF9016;	
}
.conent4_item{
	display: flex;
	// justify-content: space-between;
	flex-direction:column;
	flex-wrap: nowrap;
}
.empty{
	margin-top:100rpx;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
</style>
